{
  "$schema" : "http://json-schema.org/draft/2019-09/schema#",
  "title" : "Recuring Pre Payments Balance Rejections",
  "type" : "object",
  "additionalProperties" : false,
  "properties" : {
    "interfaceCategory" : {
      "type" : "string",
      "maxLength" : 20,
      "enum" : [ "Payments" ],
      "description" : "CMP categorization of the job that produces this extract file. This must match the corresponding outbound file."
    },
    "interfaceType" : {
      "type" : "string",
      "maxLength" : 24,
      "enum" : [ "Balance Pre Payments" ],
      "description" : "CMP sub-categorization of the job that produces this extract file. This must match the corresponding outbound file."
    },
    "version" : {
      "type" : "number",
      "minimum" : 1.0,
      "maximum" : 1.0,
      "description" : "The current version of the generic extract file. This must match the corresponding outbound file."
    },
    "externalFileName" : {
      "type" : "string",
      "pattern" : "^([a-zA-Z0-9._-])+$",
      "maxLength" : 20,
      "description" : "The name of the file that was received from the external system."
    },
    "transformDateTime" : {
      "type" : "string",
      "format" : "date-time",
      "description" : "Timestamp indicating when the third-party response file was transformed into the CMP generic format"
    },
    "transmitDateTime" : {
      "type" : "string",
      "format" : "date-time",
      "description" : "Timestamp indicating when the response file was received from the third-party system"
    },
    "details" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/RecuringPrePaymentsBalanceRejectionsDetails"
      }
    }
  },
  "required" : [ "version", "externalFileName" ],
  "definitions" : {
    "RecuringPrePaymentsBalanceRejectionsDetails" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "detailSequence" : {
          "type" : "integer",
          "description" : "Unique identifier of the detail record within the file"
        },
        "subscriptionNumber" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 99999999,
          "description" : "Subscription number to which the payment transaction applies to."
        },
        "transactionNumber" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 99999999,
          "description" : "Unique identifier of the payment transaction in CMP. This should be included in requests that are sent to third-party systems."
        },
        "transactionCode" : {
          "type" : "string",
          "description" : "Populated if the transaction has not completed normally."
        },
        "externalReference" : {
          "type" : "string",
          "description" : "May be populated for rejected transactions. E.g. an unique transaction reference provided by the third party system."
        },
        "transactionSummary" : {
          "type" : "string",
          "description" : "Short description of the transaction - e.g. may contain an external error description"
        },
        "transactionDetail" : {
          "type" : "string",
          "description" : "longer description of the transaction e.g. may contain additional error details"
        }
      },
      "required" : [ "subscriptionNumber" ]
    }
  }
}